<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 定时器返回的是闹钟的编号

        // 定时器和延时器的编号不做区分


        var t = setInterval(function(){
            console.log(666) ;
        } , 1000)
        console.log(t) ;   // 1

        var t2 = setInterval(function(){
            console.log(5) ;
        } , 100)
        console.log(t2) ;   // 2


        var t3 = setTimeout(function(){
            console.log(999);
        } , 2000)
        console.log(t3) ;  // 3
    </script>
    
</body>
</html>